import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, Params} from '@angular/router';

@Component({
  selector: 'app-styles',
  templateUrl: './styles.component.html',
  styleUrls: ['./styles.component.css']
})
export class StylesComponent implements OnInit {
  public temp: boolean;
  public stylesContent: string;
  public obj: object;

  constructor(private route: ActivatedRoute) {
  }

  ngOnInit() {
    // this.route.params.subscribe((param: Params) => {
    //   this.stylesContent = param.id;
    //   this.temp = true;
    // });
    // this.stylesContent = this.route.snapshot.params['id'];
    this.route.queryParams.subscribe((params: Params) => {
      this.obj = params;
      this.temp = false;
    });
    // this.obj = this.route.snapshot.queryParams;
  }


}
